#include <iostream>
#include<cmath>
using std::cout;
using std::endl;
using std::cin;
class OPEN_;
class Point;
class Line{
public:
    double destant(const Point& p1,const Point& p2);    
private:
   double _des; 
};
class OPEN_{
public:
    void gets(const Point & p1);
    
private:
    int _num;
                                                            
};

class Point{
public:
    Point(int x,int y)
        :_x(x)
        ,_y(y){
             cout<<"Point"<<endl;
        }
    ~Point(){

        cout<<"~Point"<<endl;
    }
    friend
    double Line::destant(const Point&,const Point&);
    friend
    void gets(const Point&);
    friend class OPEN_;
private:
    int _x;
    int _y;

};  
double Line::destant(const Point& p1,const Point &p2){
    _des =sqrt(pow(p1._x-p2._x,2)+pow(p1._y-p2._y,2));
    return _des;
}
void gets(const Point &p1){
    cout<<"x:"<<p1._x<<"y:"<<p1._y<<endl;
    return ;
}
void OPEN_::gets(const Point&p1){
    cout<<"x:"<<p1._x<<"y:"<<p1._y<<endl;
    return ;
    
}
int main()
{
    Point p1(10,3),p2(3,4);
    Line line;
    cout<<line.destant(p1,p2)<<endl;
    gets(p1);
    OPEN_ x1;
    x1.gets(p2);
    std::cout << "Hello world" << std::endl;
    return 0;
}

